<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>护士详情</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.min.css" />
		<link rel="stylesheet" href="../css/main.css" />
		<link rel="stylesheet" href="../css/mui.picker.css" />
		<link rel="stylesheet" href="../css/mui.poppicker.css" />
		<link rel="stylesheet" href="../css/feedback.css" />
		<link rel="stylesheet" href="../css/iconfont.css" />
		<link rel="stylesheet" href="../css/jquery-labelauty.css" />

		<!--图标-->
		<link rel="stylesheet" type="text/css" href="../css/icons-extra.css" />

		<style>
			#gerenzhongxin {
				background: url(../images/fdt/wodebg.png) no-repeat;
				-webkit-background-size: cover;
				-moz-background-size: cover;
				-o-background-size: cover;
				background-size: cover;
				height: 3.3rem;
			}
			
			#head-img {
				width: 100px;
				height: 100px;
				margin-top: 0.4rem;
				border-radius: 50%;
				margin-left: 0.4rem;
				border: 3px solid #c9e3f3;
			}
			
			#gerenzhongxin .upimg {
				font-size: 16px;
				padding-top: 0.7rem;
			}
			
			#gerenzhongxin .mui-table-view-cell:after {
				height: 0;
			}
			
			.fenshu {
				font-size: 0.2916rem;
				color: #FFFFFF;
				line-height: 1.5;
				vertical-align: top;
			}
			
			.danshu .mui-media-body {
				text-align: center;
			}
			
			.danshu {
				position: absolute;
				bottom: 0.1rem;
				width: 100%;
			}
			
			.danshu a span {
				font-size: 0.22rem;
			}
			
			.danshu_span {
				color: #000 !important;
				font-size: 0.32rem !important;
			}
			
			.danshu .mui-table-view {
				background: none;
			}
			
			.xingxing img {
				width: 0.3rem;
			}
			
			.vip-driver {
				position: relative;
				margin-top: 5px;
				color: #484848;
				height: 20px;
			}
			
			.driver-dengji {
				position: absolute;
				top: 0;
				left: 0;
				font-size: 0.2292rem;
			}
			
			.danshu_img {
				width: 0.35rem;
				vertical-align: middle;
			}
			
			#geren_name {
				font-size: 0.28rem;
				color: #484848;
			}
			
			.mui-navigate-right:after {
				font-size: 0.5rem;
				color: #E0E0E0;
				right: 0;
			}
			
			#table-viewX {
				font-size: 15px;
				margin-bottom: 0.08rem;
			}
			
			.mui-content-padded {
				margin: 0;
			}
			
			.mui-table-view-cell>a:not(.mui-btn).mui-active {
				background-color: transparent;
			}
			
			.mui-table-view-cell:after {
				left: 0;
			}
			
			@media screen and (min-width: 320px) and (max-width:375px) {
				.geren_shanchang {
					padding: 5px 25px;
				}
			}
			
			@media screen and (min-width: 375px) and (max-width:414px) {}
			
			@media screen and (min-width: 414px) and (max-width:576px) {}
			
			@media screen and (min-width: 576px) and (max-width:720px) {}
			
			.mui-badge-baihui {
				background-color: #e3f1fa;
				border-radius: 5px;
				border: 1px solid #96c4de;
				padding-left: 5px;
				padding-right: 5px;
				color: #afaeae;
			}
			
			.mui-badge-dabaihui {
				background-color: #dbeefa;
				border-radius: 5px;
				border: 0;
				padding: 10px;
				padding-right: 0.62rem;
				padding-left: 0.62rem;
			}
			
			.icon-ly1:before,
			.icon-dh:before {
				margin-right: 5px;
			}
			
			#geren_shanchang .mui-media-body {
				text-align: center;
			}
			
			.mui-table-view-chevron .mui-table-view-cell {
				padding-right: 40px;
			}
			
			.aixin {
				color: #da4937;
			}
			
			.haopin {
				color: #0693ff;
			}
			
			.fuwu {
				color: #e59c00;
			}
			
			.fensi {
				color: #e66831;
			}
			
			.iconfont {
				font-size: 0.25rem !important;
			}
			
			.icon-pingxing:before,
			.hongzi {
				color: #ff3300;
				font-size: 15px;
			}
			
			.dowebok li {
				margin-top: 10px;
				margin-right: 15px;
				background-color: #ffffff;
				border-radius: 10px;
				border: 1px solid rgba(0, 0, 0, 0.15);
				text-align: -webkit-center;
				font-size: 12px;
			}
			
			.libutton ul {
				list-style-type: none;
			}
			
			.libutton li {
				display: inline-block;
				margin: 5px 0;
			}
			
			.libutton input.labelauty+label {
				font: 15px "Microsoft Yahei";
				padding-left: 15px;
				padding-right: 15px;
			}
			
			.mui-table-view-cell.mui-active {
				background: #fff;
			}
			
			.mui-content>.mui-table-view:first-child {
				margin-top: 0 !important;
			}
			
			.mui-content-padded {
				padding-left: 10px;
				padding-right: 10px;
			}
			
			.mui-table-view .mui-media-object {
				line-height: 42px;
				max-width: 125px;
				height: 80px;
			}
			
			.mui-pull-right {
				font-size: 12px;
				font-weight: 400;
				line-height: 1.2;
				position: relative;
				display: inline-block;
				margin-bottom: 0;
				padding: 4px 6px;
			}
			
			.mui-table-view .mui-media,
			.mui-table-view .mui-media-body {
				overflow: hidden;
				font-size: 15px;
			}
			
			.mui-table-view-cell>a:not(.mui-btn) {
				white-space: normal;
			}
			
			.mui-table-view-cell {
				font-size: 15px;
			}
			
			.pic-circle {
				width: 100px;
				height: 100px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title" id="title">团队成员详情</h1>
		</header>
		<div class="mui-content" id="content">
			<ul class="mui-table-view mui-table-view-chevron" id="gerenzhongxin">
				<li class="mui-table-view-cell mui-media">
					<a class="" id="geren_message">
						<img class="mui-media-object mui-pull-left" id="head-img" src="../images/fdt/bj.png">
						<div class="mui-media-body upimg">
							<span id="member_name"></span> <span id="member_type"></span><br>

							<div class="vip-driver">
								<!--<span class="driver-dengji" id="totalscore_name">宽城社区医疗中心</span>-->
							</div>
							<div class="vip-driver">
								<span class="driver-dengji">服务人数：<span id="patient_quantity"></span></span>
							</div>
							<div class="vip-driver">
								<!--<span class="mui-badge mui-badge-baihui mui-text-right" id="liuyan_button"><span class="mui-icon iconfont icon-xqliuyan"></span>留言</span>-->
								<!--<span class="mui-badge mui-badge-baihui mui-text-right" id="tel_button"><span class="mui-icon iconfont icon-xqdianhua"></span>联系电话</span>-->
							</div>
						</div>
					</a>
				</li>
			</ul>
			<ul class="mui-table-view">
				<li class="mui-table-view-cell" id="doc_auth">认证状态：
					<img style="width: 20px;" id = "signImg" src="../images/wode/yrz.png" />
					<span id="sign-or">已认证</span>
				</li>

			</ul>
			<ul class="mui-table-view" style="margin:3px 0;">
				<li class="mui-table-view-cell">
					个人简介：
					<h5 id="publish-article"></h4>
				</li>
			</ul>
			<ul class="mui-table-view" id="table-viewX">
				<li class="mui-table-view-cell">
					<a>
						<div class="mui-media-body">
							发表文章：
							
						</div>
					</a>
				</li>
				<li class="tableUL">
					<!--<a href="javascript:;">
						<img class="mui-media-object mui-pull-left" src="../images/fdt/muwu.jpg">
						<div class="mui-media-body">
							打针的注意事项  
							<span class="doctor mui-pull-right">周华健 医生</span>
							<p class="mui-ellipsis2" style="margin-top: 10px;">三高是哪三高,三高人群不能吃什么?三高通常是指高血压、高血脂以及高血糖。</p>
						</div>
					</a>-->
				</li>
			</ul>
			
			
		</div>
	</body>
	<script type="text/javascript" src="../js/mui.min.js"></script>
	<script type="text/javascript" src="../plugs/qs/qs.immersed.js"></script>
	<script type="text/javascript" src="../js/app.js"></script>
	<script type="text/javascript" src="../js/constants.js"></script>
	<script type="text/javascript" src="../js/sharemethods.js"></script>
	<script type="text/javascript" src="../js/xiangyingshi.js"></script>
	<script type="text/javascript" src="../js/jquery-3.1.1.min.js"></script>
	<script type="text/javascript" src="../js/mui.zoom.js"></script>
	<script type="text/javascript" src="../js/mui.previewimage.js"></script>
	
	<script type="text/javascript" src="../plugs/moment/moment.min.js"></script>
	<script type="text/javascript" src="../js/art/template-web.js"></script>
	<script type="text/javascript" src="../js/qs/qs.art.extend.js"></script>
	<script type="text/javascript" src="../js/qs/qs.template.js"></script>
	<script type="text/javascript" src="../js/iscroll/iscroll-probe.js"></script>
	<script type="text/javascript" src="../js/qs/qs.iscroll.js"></script>
	<script>
		mui.init({
			keyEventBind: {
				backbutton: true //打开back按键监听
			},
			beforeback: function() {
				//返回true，继续页面关闭逻辑  
				mui.back;
				return true;
			}
		});

		mui.plusReady(function() {
		   // setPagePos();
			
			if(plus.navigator.isImmersedStatusbar()) { // 兼容immersed状态栏模式
				// 获取状态栏高度并根据业务需求处理，这里重新计算了子窗口的偏移位置
				topoffset = (Math.round(plus.navigator.getStatusbarHeight()) + 45) + 'px';
				document.querySelector("header").style.height = topoffset;
				document.querySelector("header").style.paddingTop = "20px";
				document.querySelector(".mui-bar-nav~.mui-content").style.paddingTop = topoffset;
			}
			
			var currentView = plus.webview.currentWebview();
			currentView.show('slide-in-right', 200);
			plus.nativeUI.closeWaiting();
			var self = plus.webview.currentWebview();
//			
//查看咨询详情
			mui(".mui-table-view").on('tap', '.mui-slider-handle', function() {
				//获取id
				var id = $(this).attr("data-id");
				mui.openWindow({
					id: 'message_xiangqing.html',
					url: '../main_sub/message_xiangqing.html',
					show: {
						autoShow: false, //页面loaded事件发生后自动显示，默认为true
						event: 'loaded' //页面显示时机，默认为titleUpdate事件时显示
					},
					waiting: {
						autoShow: true //自动显示等待框，默认为true
					},
					extras: {
						ARTICLEID: id
					}
				});
			})
//			
			//不修改对外联系电话
//			$("#btn_fdt_change_phone").click(function(event) {
//				console.log("修改对外联系电话："+self.fdt_id);
//				mui.openWindow({
//					url: 'fdt_change_phone.html',
//					id: 'fdt_change_phone',
//					extras:{fdt_id:self.fdt_id},
//					show: {
//						autoShow: false, //页面loaded事件发生后自动显示，默认为true
//						event: 'loaded' //页面显示时机，默认为titleUpdate事件时显示
//					},
//					waiting: {
//						autoShow: true //自动显示等待框，默认为true
//					}
//				});
//			});


			
			refreshPage();
		});
		
		
		
		var refreshPage = function(){
			var currentView = plus.webview.currentWebview();
			var memberId = currentView.memberId;
			var memberType= currentView.memberType;
			var memberUrl = serverAddress + "/api/doctor/showdetail/" + memberId;
			var member_success = function(data) {
				if(data.result == "success") {
					var doc = data.obj;
					$("#member_name").html(doc.name);
					var memtype=""
					if(memberType == "general-practitioner"){
						 memtype = "队长、全科医生"
					}else if(memberType == "QKHS"){
						memtype = "全科护士"
					}else if(memberType == "GWYS"){
						memtype = "公卫医生"
					}else if(memberType == "YF"){
						memtype = "预防"
					}else if(memberType == "FBYS"){
						memtype = "妇保医生"
					}else if(memberType == "EBYS"){
						memtype = "儿保医生"
					}
					
					$("#member_type").html(memtype);
					if(doc.idapprove == "2"){
						//已认证
						$("#sign-or").html("已认证");
						$("#signImg").attr("src","../images/wode/yrz.png");
					}else if(doc.idapprove == "1"){
						
						$("#sign-or").html("认证中");
						$("#signImg").attr("src","../images/wode/wrz.png");
					}else{
						
						$("#sign-or").html("未认证");
						$("#signImg").attr("src","../images/wode/wrz.png");
					}
				
					
					$('#publish-article').html(doc.introduction);
					
					$("#head-img").attr("src",serverAddress +"/"+ doc.userfaceimage.replace('client', '').replace(/\\/g, "/"));
					
				} else {
					mui.toast(data.msg);
				}
			};
			commonHttpUtils(memberUrl, "get", {}, member_success, error);
			
			//获取服务人数
			var getServicePatientQuantityUrl = serverAddress+"/api/appfamilydoctorteam/patientGetServicePatientQuantity/"+memberId;//获得医生服务患者数量
			var quantitySuccess = function(data) {
				if(data.result == "success"){
					var count = data.obj;
						//服务患者数量
					$("#patient_quantity").html(count);
				}
			}
			commonHttpUtils(getServicePatientQuantityUrl, "get", {}, quantitySuccess, error);
			//获取发表文章
			var currentView = plus.webview.currentWebview();
			var articlesId = currentView.memberId;
			var dcarticleslistUrl = serverAddress + "/api/article/patientdcarticleslist/"//根据医护id获取该医护发表的文章
			var articlesUrl = dcarticleslistUrl +articlesId;
			var articles_success = function(data) {
				console.log("根据医护id获取该医护发表的文章"+JSON.stringify(data));
				if(data.result == "success") {
					var doc = data.obj;
					console.log("发表文章:"+JSON.stringify(data.obj));
					console.log("发表文章:"+JSON.stringify(data.obj.length));
					$(".tableUL").processTL(templateRegister.doctorArticlesList,{
						sub:doc
					},"append",function(){
						
					});
				} else {
					mui.toast(data.msg);
				}
			};
			commonHttpUtils(articlesUrl, "get", {}, articles_success, error);
		}
		
			
			
	</script>

</html>